package cn.com.gensoft.app.web.user.mapStruct;

import cn.com.gensoft.app.core.mapstruct.BaseMapStruct;
import cn.com.gensoft.app.web.user.dto.SysUserDTO;
import cn.com.gensoft.app.web.user.entity.SysUserEntity;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;

/**
 * 实体类和数据传输对对象转换
 * @author hlj
 */
@Mapper(componentModel = "spring",nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS )
public abstract class SysUserMapStruct extends BaseMapStruct<SysUserDTO,SysUserEntity>{

    public static final SysUserMapStruct INSTANCE = Mappers.getMapper(SysUserMapStruct.class);

    @Override
    public abstract SysUserEntity toEntity(SysUserDTO sysUserDTO);

    @Override
    public abstract SysUserDTO toDto(SysUserEntity sysUserEntity);

    @Override
    public abstract SysUserEntity copyEntity(SysUserEntity sysUserEntity);

    @Override
    public abstract SysUserDTO copyDto(SysUserDTO sysUserDTO);
}
